<%@ include file="/taglibs.jsp"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<head>
<title>北京邮电大学学生党员在线学习中心</title>

<!-- 获得验证码 -->
<SCRIPT type=text/javascript>
function change() {
	var randomnumber = Math.random();
	document.getElementById("yanzhengmatu").src = "yanzhengma.jsp?a="+randomnumber;
}
</SCRIPT>

<script type="text/javascript">
	String.prototype.trim = function()
	{
	  return this.replace(/(^\s*)|(\s*$)/g, "");
	}
	
	function check() {
		   var userid = document.form1.userid.value.toString();
		   var password = document.form1.password.value.toString();
		   var yanzhengma = document.form1.yanzhengma.value.toString();
		   
 	   if(userid.trim().length == 0) {
		       alert('请输入用户账号！');
		       document.form1.userid.focus();
		       return false;
		       
		   } else if(password.trim().length == 0) {
		       alert('请输入密码！');
		       document.form1.password.focus();
		       return false;
		        
		   } else if(yanzhengma.trim().length == 0) {
		       alert('请输入验证码 ！');
		       document.form1.yanzhengma.focus();
		       return false;
		   } 
 	  		  document.form1.submit();
	
		}
				
	
	</script>


</head>

<div align="center" style=" background-color: #FCEEE9; height:400px; ">
<div style="height:50px; clear:both;"></div>
<span style="text-align: center;"><font color=red><b>提示：
<s:if test="#request.result==''||#request.result==null">
您还没有登录，请先登录！
</s:if><s:else>
<s:property value="#request.result"/>
</s:else>
</b></font> </span>
<div style="margin-top: 10px; width:200px;">
   <form action="${ctx}/loginAction" method="post" name="form1" >
    <input type="hidden" name="categoryId" value="${categoryId}"/>
    <input type="hidden" name="videopath" value="${videopath}"/>
    <table id="loginPad" border="0" cellspacing="5" cellpadding="0" style="border:solid 1px #dddddd;  width:220px;">
    	<tr>
    		<td>用&nbsp;户&nbsp;名:</td>
            <td><input name="userid" type="text" value="" style="width:140px;" /></td>
    	</tr>
    	<tr>
    		<td>类&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别:</td>
            <td>
            	<select name="userstatus"  style="width:145px;">
                      <option value="1">学生</option>
                      <option value="2">管理员</option>
                </select>
            </td>		
    	</tr>
        <tr>
    		<td>密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码:</td>
            <td><input name="password" type="password" value="" style="width:140px;" /></td>
    	</tr>
        <tr>
    		<td>验&nbsp;证&nbsp;码:</td>
            <td>
            	<input name="yanzhengma" type="text" value="" style="width:70px; float:left;"/>
            	<a href="#" onclick="change();"><img id="yanzhengmatu" src="yanzhengma.jsp" style="width:60px; height:20px; margin:0px; float:left; margin-left:8px;"  alt="点击换一张"></a>
            </td>
    	</tr>
        <tr>
    		<td></td>
            <td><input type="image" src="${ctx}/images/index_login_btn.jpg"  style="border:0px; width:94px; height:24px; display:inline;"  onclick= "javascript:return check(); "></td>
    	</tr>
    </table>
    </form>
</div>


</div>
